package com.fit.networkShop.pages;

import java.util.Collection;

import org.apache.tapestry5.annotations.ApplicationState;
import org.apache.tapestry5.ioc.annotations.Inject;

import com.fit.networkShop.interfaces.User;
import com.fit.networkShop.service.Users;



public class ViewAllUsers {
	@ApplicationState
	private User user;
	private boolean userExists;

	public User getUser() {
		return this.user;
	}

	@Inject
	private Users users;

	public Collection getUsers() {
		return this.users.retrieve();
	}

	Object onActivate() {
		// Da li je user logovan
		if (!userExists)
			return Login.class;
		return null;
	}
}
